package com.ins.common.utils;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * InsUtils
 *
 * @author aa
 * @version 1.0
 * @since 2024/8/1
 */
public class InsUtils {

    /**
     * 订单前缀
     */
    public static final String ORDER_NO_PREFIX = "10";

    /**
     * 钱包前缀
     */
    public static final String WALLET_NO_PREFIX = "20";

    public static String getNoPrefix(String prefix) {
        LocalDateTime time = LocalDateTime.now();
        String date = time.format(DateTimeFormatter.ofPattern("yyMMdd"));
        return prefix + date + "-";
    }
}
